cmake_minimum_required(VERSION 3.10.0)

if(WIN32)
    message(STATUS "Windows system")
    set(CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
    link_directories("C:/vcpkg/installed/x64-windows/lib")
    include_directories("C:/vcpkg/installed/x64-windows/include")
elseif(UNIX)
    message(STATUS "Unix/Linux system")
    # Ubuntu 等 Unix-like 特定设置
endif()


set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_TYPE Debug)

project(test VERSION 0.1.0 LANGUAGES C CXX)

add_executable(open src/open.cpp)
target_link_libraries(open PRIVATE avcodec avformat avutil)

add_executable(capture_picture src/capture_picture.cpp)
target_link_libraries(open PRIVATE avdevice avformat avfilter avcodec avutil swscale swresample)

